import {createBrowserRouter, NavLink} from 'react-router-dom'

import Home from '../vites/Home/index'
import Delete from '../vites/Delete/Index'
import Mylist from '../vites/Mylist/index'
import Display from '../vites/display/display'
import Login from '../vites/Login/Index'
import Barrage from '../vites/Barrage/Index'
import Yuyin from '../vites/Yuyin/Index'
import Aihome from '../vites/AiHome/AiHome'
import Sety from '../vites/Sety/Index'

const routes=[
    {
        path:'/',
        element:<Home></Home>
    },
    {
        path:'/delete',
        element:<Delete></Delete>
    }
]

const router=createBrowserRouter([
    {
        path:'/',
        element:<Mylist></Mylist>,
        children:[
            ...routes,
            {
                path:'/',
                element:<NavLink to='/home'></NavLink>
            }
        ]
    },
    {
        path:'/display',
        element:<Display></Display>
    },
    {
        path:'/login',
        element:<Login></Login>
    },
    {
        path:'/barrage',
        element:<Barrage></Barrage>
    },
    {
        path:'/yuyin',
        element:<Yuyin></Yuyin>
    },
    {
        path:'/aihome',
        element:<Aihome></Aihome>
    },
    {
        path:'sety',
        element:<Sety></Sety>
    }
])

export default router